package com.example.classassistant;

import java.util.ArrayList;
import java.util.List;
public class Student {
    String name;
    int id;
    int attendance;
    int correctNumber;


    public Student(String name, int id) {
        this.name = name;
        this.id = id;
        this.attendance =  0;
        this.correctNumber = 0;
    }

    public String toString() {
        return "Student: " +  name +
                " id: " + id +
                " 考勤次数: " + attendance +
                " 成绩: " + correctNumber;
    }

    public void addAttendance(){
        this.attendance++;
    }
    public int getAttendance(){
        return attendance;
    }

    public void addCorrectNumber(){
        this.correctNumber++;
    }
    public int getCorrectNumber(){
        return correctNumber;
    }
}